package com.itheima.pattern.visitor.doublefenpai;

public class Test {
    public static void main(String[] args) {
        Animal animal = new Animal();
        Animal dog = new Dog();
        Animal cat = new Cat();

        Execute exe = new Execute();
        animal.accept(exe);
        dog.accept(exe);//受限完成动态分派，其次进行静态分派
        cat.accept(exe);
    }
}
